import 'package:base_flutter/base_flutter.dart';
import 'package:ls_work/net/api/http_api.dart';

import '../net/response/sys_info_data.dart';

class SysInfoModel extends BaseMvvmModel {
  @override
  void onCleared() {}

  Future<SysInfoData> getSysInfo(String name,String domain) async {
    var data = await HttpGo.instance
        .getData(HttpApi.sysInfo, data: {"paramName": name,"domain":domain});
    if("0"==data['code']){
      return SysInfoData.fromJson(data['data']);
    }else{
      throw data['msg'];
    }
  }
}
